﻿<%@ Register TagPrefix="uc1" TagName="UsersRolesControl" Src="UserControls/UsersRolesControl.ascx" %>
<%@ Page buffer=true language="c#" Codebehind="TaskForm.aspx.cs" AutoEventWireup="false" Inherits="DNNContentBuilder.TaskForm" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
	<head>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<script language="javascript">
		<!--
			function validateForm() {
				if (document.forms[0].<%=txtTitle.UniqueID%>.value == "") {
					alert("Título requerido"); //Title required
					return false;
				}
				if (document.forms[0].<%=txtDescription.UniqueID%>.value == "") {
					alert("Descrição requerida"); //Description required
					return false;
				}
				
				if (document.forms[0].<%=txtDescription.UniqueID%>.value == "") {
					alert("Descrição requerida"); //Description required
					return false;
				}

				if (document.forms[0].lbUsersSelected.value == "" && document.forms[0].lbRolesSelected.value == "") {
					alert("Responsável requerido"); //select at least an user or role
					return false;
				}

				document.forms[0].<%=txtTitle.UniqueID%>.value.replace("^","");
				document.forms[0].<%=txtDescription.UniqueID%>.value.replace("^","");
			}
		//-->
		</script>
	</head>
	<body MS_POSITIONING="FlowLayout" topmargin="0" leftmargin="0"" onload="javascript: setVars()">
		<form id="taskForm" method="post" runat="server" onsubmit="javascript: validateForm()">
			<table id="Table1" cellspacing="1" cellpadding="1" border="0">
				<tr>
					<td bgcolor="#f5f5f5" style="HEIGHT: 24px" colspan="2"><script language=javascript>document.write(window.opener.document.forms[0].idLabelTaskWindowTitle.value)</script></td>
				</tr>
				<tr>
				<tr>
					<td style="HEIGHT: 24px" colspan="2">&nbsp;</td>
				</tr>
				<tr>
					<td style="WIDTH: 279px"><script language=javascript>document.write(window.opener.document.forms[0].idLabelTaskTitle.value)</script></td>
					<td>
						<asp:textbox id="txtTitle" runat="server"></asp:textbox></td>
				</tr>
				<tr>
					<td style="WIDTH: 279px"><script language=javascript>document.write(window.opener.document.forms[0].idLabelTaskDescription.value)</script></td>
					<td>
						<asp:textbox id="txtDescription" runat="server" Columns="30" Rows="4" TextMode="MultiLine"></asp:textbox></td>
				</tr>
				<tr>
					<td style="WIDTH: 279px"><script language=javascript>document.write(window.opener.document.forms[0].idLabelTaskOwner.value)</script></td>
					<td>
						<uc1:usersrolescontrol id="UsersRolesControl1" runat="server"></uc1:usersrolescontrol></td>
				</tr>
				<tr>
					<td style="WIDTH: 279px"></td>
					<td></td>
				</tr>
				<tr>
					<td colspan="2"><hr noshade width="100%" size="1">
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<p align="center"><a href="#" onclick="javascript: returnValues();"><script language=javascript>document.write(window.opener.document.forms[0].idLabelbtUpdate.value)</script></a>&nbsp;
							<a href="#" onclick="javascript: window.close()"><script language=javascript>document.write(window.opener.document.forms[0].idLabelbtCancel.value)</script></a>&nbsp;</p>
					</td>
				</tr>
				<tr>
					<td colspan="2"></td>
				</tr>
			</table>
		</form>
	</body>
</html>
